<%-- 
  - Author: Asna Khader
  - Date: 02-Apr-2012
  - Copyright Notice: TRAKHEES
  - Description: Menu.jsp
 --%>
<%@ include file="/WEB-INF/view/include.jsp"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
    	<div class="t_menu-heading"><spring:message code="menu.header.label" /></div>
		<div id="firstpane" class="menu_list"> <!--Code for menu starts here-->
		<div class="menu_head"><div class="hIcon"><img src="resources/images/company_detail.jpg" /></div><span class="pHead"><a href="tksadmin/company/home/show.htm"><spring:message code="menu.label.home" /></a></span><div class="hArrow"></div></div>
   		<div class="menu_head"><div class="hIcon"><img src="resources/images/application.jpg" /></div><span class="pHead"><a href="tksadmin/all/request/show.htm"><spring:message code="menu.label.all_application_requests" /></a></span><div class="hArrow"></div></div>
   		<div class="menu_head"><div class="hIcon"><img src="resources/images/gov_services.jpg" /></div><span class="pHead"><a href="tksadmin/finance/services/show.htm?appId=0"><spring:message code="menu.label.fin.services" /></a></span><div class="hArrow"></div></div>
       <div class="bg_MenuBottom"></div>   
    </div>
    	   
		
    
<script type="text/javascript">

$(document).ready(function()
{
	//slides the element with class "menu_body" when paragraph with class "menu_head" is clicked 
	$("#firstpane div.menu_head").click(function()
    {   
    
     $("#firstpane div.menu_head").each(function()
       	{
       	if(jQuery.browser.msie)
       	{
if($(this).find(".hArrow").find("img")[0] != null)
{
	       	var imgOC = $(this).find(".hArrow").find("img")[0].href;
       	    if(imgOC.indexOf('open.jpg')!=-1)
       	    {
       	        $(this).find(".hArrow").find("img")[0].src = "resources/images/close.jpg"
       	    }
           }

       	 }else{// not IE
       	 if($(this).find(".hArrow").find("img")[0] !=null)
{
	       	 var imgOC = $(this).find(".hArrow").find("img")[0].src;
       	    if(imgOC.indexOf('open.jpg')!=-1)
       	    {
       	        $(this).find(".hArrow").find("img")[0].src = "resources/images/close.jpg"
       	    }
}

       	 }
        });
    
        $(this).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");        
       	 if(jQuery.browser.msie)
       	 {
if($(this).find(".hArrow").find("img")[0] != null)
{
	       	    var imgOC = $(this).find(".hArrow").find("img")[0].href;
       	    if(imgOC.indexOf('close.jpg')==-1)
       	    {
       	        $(this).find(".hArrow").find("img")[0].src = "resources/images/close.jpg"
       	    }else{
       	        $(this).find(".hArrow").find("img")[0].src = "resources/images/open.jpg"
       	    }
}

       }else// not ie
       {
if($(this).find(".hArrow").find("img")[0] != null)
{
        var imgOC = $(this).find(".hArrow").find("img")[0].src;
       	    if(imgOC.indexOf('close.jpg')==-1)
       	    {
       	        $(this).find(".hArrow").find("img")[0].src = "resources/images/close.jpg"
       	    }else{
       	        $(this).find(".hArrow").find("img")[0].src = "resources/images/open.jpg"
       	    }
}

       }
	});

});
</script>

